<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title><?php echo ($webData["title"]); ?></title>
		<link rel="shortcut icon" href=" __PUBLIC__/Imgs/bitbug_favicon.ico" />
		<link href="__PUBLIC__/Home/Css/header.css" rel="stylesheet" type="text/css" />	
	</head>
	<body>
		<div id="header_top">
<!--			<img src="__ROOT__/Uploads/thumb/th_<?php echo ($webData["logo"]); ?>" style="float:left;" width="150">-->
			<img src="__ROOT__/Uploads/thumb/st.jpg" style="float:left;" width="150">
			<form action="__APP__/Index/searchFoods" method="post">
				<input type="text" id="header_seach" name="fname">
				<input type="submit" id="header_sub" value="搜索">
			</form>

			<ul id="header_ul">
				<li><a href="__APP__/Index/index/">首页</a></li>
				<li><a href="__APP__/Bclass/index/">菜谱分类</a></li>
			</ul>
			<div id="header_login">
			<?php if(empty($_SESSION['uname'])): ?><span>
						<a href="__APP__/Login/login/" target="_blank">
							登录
						</a>
					</span>
					<span>
						<a href="__APP__/Login/reg/" target="_blank">
							注册
						</a>
					</span>
			<?php else: ?>				
				<span>
					<a href="">
					<?php echo (session('uname')); ?>
					</a>
				</span>
				<span>
					<a href="__APP__/Ucenter/index/pass">
					个人中心
					</a>
				</span>
				<span>
					<a href="__APP__/Carts/showCarts/">
					购物车
					</a>
				</span>
				<?php if(!empty($_SESSION['uMsg'])): ?><span>
					<a href="__APP__/Posts/details/form_number/<?php echo (session('uMsg')); ?>" class="clearMsg">
					新订单
					</a>
				</span><?php endif; ?>
				<span style="font-size:14px;">
					<a href="__APP__/Public/loginout/">
					退出
					</a>
				</span><?php endif; ?>
			</div>
		</div>
		<div style="clear:both;height:30px;"></div>
	</body>
</html>
<head>
	<meta charset="UTF-8">
	<title>添加用户订单</title>
	<link href="__PUBLIC__/Home/Css/addPosts.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.8.3.js"></script>
	<script>
	$(function(){
		var maxLength = 131;
		//限制输入框中字的长度，未完成
		$("#ask").keydown(function(){
			var curLength = $("#ask").val().length;	
			if(curLength>=maxLength){
				var num=$("#ask").val().substr(0,maxLength-1);
				$("#ask").val(num);
			} 
		});

		/* 取消订单,返回到购物车页面 */
		$('.inp22_red').click(function(){
			window.location.href = '__APP__/Carts/showCarts/';
		});
	});

	</script>
</head>

<body>
	<div id="addPosts">
		<div class="left">
			<div class="nav">
				<img class="nav_o" src="__PUBLIC__/Home/Imgs/orders_actions_icon.gif">
				<span>创建订单</span>
				<span></span>
			</div>
			<div class="posts_wrap">
				<form action="__APP__/Posts/finPosts" method="post">
			  	<table width="620" border="0" cellpadding="0" cellspacing="0">
				    	<tr>
				      		<td height="10" colspan="3">&nbsp;</td>
			        	   	</tr>
				   	<tr>			     
			                  		<td  class="form_font" colspan="3">
			                 		 <span class="explain">　订餐说明：</span>
			                 		 <span class="font_explain">平均取餐时间大概在15分钟后，请及时取餐！
	                   	 	       		</span>                  
	 			       		</td>
	                		    	</tr>
				    	<tr>
				      		<td align="right" height="33">姓名</td>
				      		<td width="309">　<?php echo (session('utruename')); ?></td>
				      		<td width="237" class="font_explain">&nbsp;</td>
			       	 	</tr>
				    	<tr>
				    	  <td align="right" height="39">您的手机</td>
				    	  <td width="309">　<?php echo (session('uphone')); ?></td>
				    	  <td width="237" class="font_explain">
<!--				    	  	<a href="__APP__/Ucenter/index/pass" style="text-decoration:none;color:#992222;font-size:13px;">需更换？请点击</a>-->
				    	  </td>
                  				</tr>
			    		<tr>
			      			<td align="right" height="30"><label for="address">详细地址</label></td>
			      			<td>　<?php echo (session('uaddress')); ?></td>
			      			<td class="font_explain">
<!--			      				<a href="__APP__/Ucenter/index/address" style="text-decoration:none;color:#992222;font-size:13px;">新地址？请点击</a>-->
			      			</td>
		        			</tr>
			    		<tr>
			      			<td align="right" height="100"><label for="userohters">餐饮要求</label></td>
			      			<td>
		          				<textarea name="ask" id="ask" cols="45" rows="5" style="height:100px; width:300px;resize:none;"></textarea>
		          	      			</td>
			      			<td class="font_explain">对这些食物的其它要求，方便更适合您的口味</td>
		        			</tr>
					<tr>
				      		<td colspan="3" align="right" height="100">
		                  				<input class="inp22" type="submit" value="确认订单" />
		                        			<input class="inp22_red" type="button" value="取消订单" />                  	
	                  		　　		</td>
		        			</tr>
		      		</table>
				</form>	
			</div>
		</div>
		<div class="right">
			<table width="620" border="0" cellpadding="0" cellspacing="0">
				<caption><b>餐单详情</b></caption>
				<tr>
					<th>名称</th>
					<th>价格</th>
					<th>数量</th>
					<th>总计</th>
				</tr>　　　　　　　　　　　　				
				<?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
						<td align="center">
							<?php echo ($vo["name"]); ?>
						</td>
						<td>
							<?php if(empty($vo["yprice"])): echo ($vo["price"]); ?>元
		                                                	<?php else: ?> 	<?php echo ($vo["yprice"]); ?>元<?php endif; ?>
						</td>
						<td>x<?php echo ($vo["number"]); ?></td>
						<td>
							<?php echo ($vo["totals"]); ?>
							元
						</td>
					</tr><?php endforeach; endif; else: echo "" ;endif; ?> 
			</table>
			<span class="total">总计：
			<?php echo ($sum); ?>元
			</span>
		</div>
	</div>
</body>
</html>